package com.itheima.d1_junit;

import org.junit.*;

import static org.junit.Assert.*;

public class StringUtilTest {
    //测试方法正常的三大问题
    //1、不能出现异常
    //2、结果要符合逻辑
    //3、相应速度要在可接受范围内

    @Test
    public void printNumber() {
        StringUtil.printNumber("xixi");
    }

    @Test
    public void getMaxIndex() {
        int maxIndex = StringUtil.getMaxIndex("1");
        System.out.println(maxIndex);
    }

    @Before
    public void before() {
        System.out.println("before");
    }

    @After
    public void after() {
        System.out.println("after");
    }

    @BeforeClass
    public static void beforeClass() {
        System.out.println("BeforeClass");
    }

    @AfterClass
    public static void afterClass() {
        System.out.println("AfterClass");
    }
}